<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">11063</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-05-19T12:39:41-04:00</created-at>
  <creator-id type="integer">11063</creator-id>
  <milestone-due-on type="datetime">2009-05-18T20:00:00-04:00</milestone-due-on>
  <milestone-id type="integer">40236</milestone-id>
  <number type="integer">1</number>
  <permalink>occurrence-lists-not-picking-up-timewithzone-identifier</permalink>
  <priority type="integer">1</priority>
  <project-id type="integer">30941</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag nil="true"></tag>
  <title>Occurrence Lists not picking up TimeWithZone identifier</title>
  <updated-at type="datetime">2009-05-19T16:29:48-04:00</updated-at>
  <user-id type="integer">11063</user-id>
  <user-name>Rick DeNatale</user-name>
  <creator-name>Rick DeNatale</creator-name>
  <assigned-user-name>Rick DeNatale</assigned-user-name>
  <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/1</url>
  <milestone-title>0.0.8</milestone-title>
  <original-body>This was reported by Adam Williams

The problem now is exdate:

  Given s is a Series, which has_many Event::Exceptions (a model
which represents changes to Event instances):

        s.exceptions.each do |e|
          exception_date_time = Time.zone.local(
            e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
            s.originating_event.starts_at.hour,
            s.originating_event.starts_at.min)
          ievent.add_exdate exception_date_time
          ical.event do |ievent_exception|
            build_event(ievent_exception, Event::Occurrence.new(s,
e.occurs_on, e))
          end unless e.deletion?
        end

As you can see, I am utilizing Time.zone to create an
ActiveSupport::TimeWithZone instance that has the same date as the
Event::Exception, but the hour and minute of the originating Event in
the Series. It is my understanding that this is how exdate works - the
exact date and time in the recurrence that is an exception to the rrule.


Here is what is produced:

  BEGIN:VEVENT
  EXDATE:20081126T183000Z
  DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000
  DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000
  RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su
  END:VEVENT


Notice that the EXDATE is not respecting the time zone of the
ActiveSupport::TimeWithZone instance.</original-body>
  <latest-body>This was reported by Adam Williams

The problem now is exdate:

  Given s is a Series, which has_many Event::Exceptions (a model
which represents changes to Event instances):

        s.exceptions.each do |e|
          exception_date_time = Time.zone.local(
            e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
            s.originating_event.starts_at.hour,
            s.originating_event.starts_at.min)
          ievent.add_exdate exception_date_time
          ical.event do |ievent_exception|
            build_event(ievent_exception, Event::Occurrence.new(s,
e.occurs_on, e))
          end unless e.deletion?
        end

As you can see, I am utilizing Time.zone to create an
ActiveSupport::TimeWithZone instance that has the same date as the
Event::Exception, but the hour and minute of the originating Event in
the Series. It is my understanding that this is how exdate works - the
exact date and time in the recurrence that is an exception to the rrule.


Here is what is produced:

  BEGIN:VEVENT
  EXDATE:20081126T183000Z
  DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000
  DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000
  RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su
  END:VEVENT


Notice that the EXDATE is not respecting the time zone of the
ActiveSupport::TimeWithZone instance.</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;This was reported by Adam Williams&lt;/p&gt;
&lt;p&gt;The problem now is exdate:&lt;/p&gt;
&lt;p&gt;Given s is a Series, which has_many Event::Exceptions (a model
which represents changes to Event instances):&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;    s.exceptions.each do |e|
      exception_date_time = Time.zone.local(
        e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
        s.originating_event.starts_at.hour,
        s.originating_event.starts_at.min)
      ievent.add_exdate exception_date_time
      ical.event do |ievent_exception|
        build_event(ievent_exception, Event::Occurrence.new(s,
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;e.occurs_on, e))&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;      end unless e.deletion?
    end
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As you can see, I am utilizing Time.zone to create an
ActiveSupport::TimeWithZone instance that has the same date as the
Event::Exception, but the hour and minute of the originating Event
in the Series. It is my understanding that this is how exdate works
- the exact date and time in the recurrence that is an exception to
the rrule.&lt;/p&gt;
&lt;p&gt;Here is what is produced:&lt;/p&gt;
&lt;p&gt;BEGIN:VEVENT EXDATE:20081126T183000Z
DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000
DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000
RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su END:VEVENT&lt;/p&gt;
&lt;p&gt;Notice that the EXDATE is not respecting the time zone of the
ActiveSupport::TimeWithZone instance.&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This was reported by Adam Williams

The problem now is exdate:

  Given s is a Series, which has_many Event::Exceptions (a model
which represents changes to Event instances):

        s.exceptions.each do |e|
          exception_date_time = Time.zone.local(
            e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
            s.originating_event.starts_at.hour,
            s.originating_event.starts_at.min)
          ievent.add_exdate exception_date_time
          ical.event do |ievent_exception|
            build_event(ievent_exception, Event::Occurrence.new(s,
e.occurs_on, e))
          end unless e.deletion?
        end

As you can see, I am utilizing Time.zone to create an
ActiveSupport::TimeWithZone instance that has the same date as the
Event::Exception, but the hour and minute of the originating Event in
the Series. It is my understanding that this is how exdate works - the
exact date and time in the recurrence that is an exception to the rrule.


Here is what is produced:

  BEGIN:VEVENT
  EXDATE:20081126T183000Z
  DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000
  DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000
  RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su
  END:VEVENT


Notice that the EXDATE is not respecting the time zone of the
ActiveSupport::TimeWithZone instance.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This was reported by Adam Williams&lt;/p&gt;
&lt;p&gt;The problem now is exdate:&lt;/p&gt;
&lt;p&gt;Given s is a Series, which has_many Event::Exceptions (a model
which represents changes to Event instances):&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;    s.exceptions.each do |e|
      exception_date_time = Time.zone.local(
        e.occurs_on.year, e.occurs_on.month, e.occurs_on.day,
        s.originating_event.starts_at.hour,
        s.originating_event.starts_at.min)
      ievent.add_exdate exception_date_time
      ical.event do |ievent_exception|
        build_event(ievent_exception, Event::Occurrence.new(s,&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;e.occurs_on, e))&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;      end unless e.deletion?
    end&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;As you can see, I am utilizing Time.zone to create an&lt;br&gt;
ActiveSupport::TimeWithZone instance that has the same date as
the&lt;br&gt;
Event::Exception, but the hour and minute of the originating Event
in&lt;br&gt;
the Series. It is my understanding that this is how exdate works -
the&lt;br&gt;
exact date and time in the recurrence that is an exception to the
rrule.&lt;/p&gt;
&lt;p&gt;Here is what is produced:&lt;/p&gt;
&lt;p&gt;BEGIN:VEVENT EXDATE:20081126T183000Z
DTEND;TZID=America/New_York;VALUE=DATE-TIME:20081119T193000
DTSTART;TZID=America/New_York;VALUE=DATE-TIME:20081119T183000
RRULE:FREQ=WEEKLY;UNTIL=20081218;BYDAY=WE;WKST=su END:VEVENT&lt;/p&gt;
&lt;p&gt;Notice that the EXDATE is not respecting the time zone of
the&lt;br&gt;
ActiveSupport::TimeWithZone instance.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T12:39:41-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">1</number>
      <permalink>occurrence-lists-not-picking-up-timewithzone-identifier</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Occurrence Lists not picking up TimeWithZone identifier</title>
      <updated-at type="datetime">2009-05-19T12:39:44-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/1</url>
      <milestone-title nil="true"></milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-19T13:52:31-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:milestone: 
</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">1</number>
      <permalink>occurrence-lists-not-picking-up-timewithzone-identifier</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Occurrence Lists not picking up TimeWithZone identifier</title>
      <updated-at type="datetime">2009-05-19T13:52:33-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/1</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">11063</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body></body>
      <body-html></body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-19T16:29:45-04:00</created-at>
      <creator-id type="integer">11063</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer">40236</milestone-id>
      <number type="integer">1</number>
      <permalink>occurrence-lists-not-picking-up-timewithzone-identifier</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">30941</project-id>
      <state>resolved</state>
      <tag nil="true"></tag>
      <title>Occurrence Lists not picking up TimeWithZone identifier</title>
      <updated-at type="datetime">2009-05-19T16:29:48-04:00</updated-at>
      <user-id type="integer">11063</user-id>
      <user-name>Rick DeNatale</user-name>
      <creator-name>Rick DeNatale</creator-name>
      <assigned-user-name>Rick DeNatale</assigned-user-name>
      <url>http://rick_denatale.lighthouseapp.com/projects/30941/tickets/1</url>
      <milestone-title>0.0.8</milestone-title>
    </version>
  </versions>
</ticket>
